window.list = window.list || {};
list.RingItem = function () {
    var s = this;
    annie.Sprite.call(s);
	/*_a2x_need_start*/s.bg=null;s.cid=null;s.imageCon=null;s.name=null;s.score=null;/*_a2x_need_end*/
    annie.initRes(s, "list", "RingItem");
    s.rectFace=new annieUI.FacePhoto();
    s.imageCon.addChild(s.rectFace);

};
A2xExtend(list.RingItem, annie.Sprite);
list.RingItem.prototype.id = 0;
list.RingItem.prototype.data = null;
list.RingItem.prototype.initData = function (id, data) {
    var s = this;
    s.id = id;
    s.data = data;
    if (data) {
        s.dataHandler();
        s.visible = true;
    } else {
        s.visible = false;
    }
};
list.RingItem.prototype.dataHandler = function () {
    var s = this;
    s.cid.text = s.id+1;
    s.rectFace.init(s.data.headimgurl, 88,88, 1);
    s.name.text= s.data.nickname;
    s.score.text = s.data.score;
    s.bg.gotoAndStop(2);
    if(s.data.myself){
        s.bg.gotoAndStop(1);
    }
};